cmake_minimum_required(VERSION 3.10.2)
project(timewheel)
find_package(Threads)
set(CMAKE_CXX_STANDARD 17) 
add_definitions("-Wall -g")

file(GLOB_RECURSE utils_srcs  ../../base/src/*.cpp)
file(GLOB_RECURSE hub_srcs  ./src/*.cpp)
file(GLOB_RECURSE datatime_srcs ../../datetime/src/*.cpp)
file(GLOB_RECURSE logger_srcs ../../logging/src/*.cpp)
file(GLOB_RECURSE thread_srcs  ../../thread/src/*.cpp)
file(GLOB_RECURSE net_srcs  ../src/*.cpp)

add_executable(multiplexer multiplexer_main.cpp multiplexer.cpp ${hub_srcs} ${logger_srcs} ${utils_srcs} ${thread_srcs} ${net_srcs} ${datatime_srcs})
target_link_libraries(multiplexer ${CMAKE_THREAD_LIBS_INIT})

add_executable(demux demux_main.cpp demux.cpp ${hub_srcs} ${logger_srcs} ${utils_srcs} ${thread_srcs} ${net_srcs} ${datatime_srcs})
target_link_libraries(demux ${CMAKE_THREAD_LIBS_INIT})